<template>
    <div class="container">
        <!-- 文字区域 -->
        <div class="text">
            This is Home !
        </div>
        <!-- 功能区域 -->
        <div class="btn">
            <el-button type="primary" @click="add10(10)">clicked {{ $store.state.times }} times</el-button>
        </div>
    </div>
</template>

<script>
export default {
  name: 'HomeView',
  data () {
    return {
    }
  },
  created () {
  },
  methods: {
    // 次数加10
    add10 (num) {
      this.$store.commit('changeTimes', num)
    }
  }

}

</script>

<style lang="less" scoped>
    .container{
        .text{
            height: 100px;
            text-align: center;
            line-height: 100px;
            font-size: 32px;
            font-weight: bold;
            color: #666;
        }
        .btn{
            text-align: center;
        }
    }
</style>
